package com.welike.shibo.exception;


import com.welike.shibo.enums.ResultEnum;

/**
 * @author fangyu
 * @version v1.0.0
 * @since 2019-07-23 19:48
 */
public class BaseException extends RuntimeException {

    private Integer code;

    public BaseException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public BaseException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
